import config from "@/config"

//系统路由
const routes = [
	{
		name: "layout",
		path: "/",
		component: () => import('@/layout/index.vue'),
		redirect: config.DASHBOARD_URL || '/dashboard',
		children: [
			// 添加默认的 dashboard 路由
			{
				name: "dashboard",
				path: "/dashboard",
				component: () => import('@/views/home/index.vue'),
				meta: {
					title: "控制台"
				}
			}
		]
	},
	{
		path: "/login",
		component: () => import('@/views/login/index.vue'),
		meta: {
			title: "登录"
		}
	},
	{
		path: "/user_register",
		component: () => import('@/views/login/userRegister.vue'),
		meta: {
			title: "注册"
		}
	},
	{
		path: "/reset_password",
		component: () => import('@/views/login/resetPassword.vue'),
		meta: {
			title: "重置密码"
		}
	}
]

export default routes;
